package org.hxzon.workeasy.components.base;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hxzon.workeasy.model.EasyUzer;
import org.hxzon.workeasy.pages.base.MyBasePage;

public class MyBaseLayout {
    @Parameter(defaultPrefix = BindingConstants.LITERAL)
    private String pageTitle;

    @Inject
    private ComponentResources componentResources;

    private MyBasePage getPage() {
        return (MyBasePage) componentResources.getPage();
    }

    public String getMessage() {
        return getPage().getMessage();
    }

    public String getPageTitle() {
        return pageTitle;
    }

    public EasyUzer getVisitor() {
        return getPage().getVisitor();
    }

    public String getWebUrl() {
        return getPage().getWebUrl();
    }

//	public String getRedirectPath() {
//		String path = null;
//		return path;
//	}
}
